﻿using System;

namespace Test30.Engine
{
    public class DelegateAction : Action
    {
        public DelegateAction(Entity entity)
            : base(entity)
        {
        }

        protected void SetCallback(Func<ActionResult> callback) { _callback = callback; }

        protected override ActionResult OnProcess()
        {
            return _callback();
        }

        private Func<ActionResult> _callback;
    }

}
